package cate.game.status;

import cate.game.GameBody;
import cate.game.framework.ISpanable;

/** 跨天/周/月 执行器 */
public class SpanExe implements ISpanable{
    public GameBody game;

    public SpanExe(){

    }

    public SpanExe(GameBody game){
        this.game = game;
    }

    public void checkSpan() {
        if (game.status.checkDaySpan()) {
            this.onDaySpan();
        }

        if (game.status.checkWeekSpan()) {
            this.onWeekSpan();
        }

        if (game.status.checkMonthSpan()) {
            this.onMonthSpan();
        }
    }

    @Override
    public void onDaySpan() {
        game.onDaySpan();
    }

    @Override
    public void onWeekSpan() {
        game.onWeekSpan();
    }

    @Override
    public void onMonthSpan() {
        game.onMonthSpan();
    }
}
